import request from '@/utils/request'

// 获取报修单
export function getRepair(data) {
  return request({
    'url': '/repair/infc/repair/list',
    'method': 'get',
	params:data
  })
}
//根据状态查询报修单 
export function getStatus(data) {
  return request({
    'url': '/repair/infc/allStatus/list',
    'method': 'get',
	params:data
  })
}
//报修单详情
export function getDetails(id) {
  return request({
    'url': '/repair/infc/repair/' + id,
    'method': 'get'
  })
}

//接收
export function reception(id) {
  return request({
    'url': '/mes/dv/receiving/orderReceive/' + id,
    'method': 'put'
  })
}

//派工名单
export function work() {
  return request({
    'url': '/infc/system/user/list',
    'method': 'get'
  })
}

//派工
export function putWork(data) {
  return request({
    'url': '/mes/dv/receiving/designate',
    'method': 'put',
	data
  })
}

//退回
export function sendBack(data) {
  return request({
    'url': `/repair/infc/${data.repairId}/${data.backReason}`,
    'method': 'put',
	data
  })
}

//验证
export function putVerify(data) {
  return request({
    'url': '/repair/infc/confirm',
    'method': 'put',
	data
  })
}